
import request from '@/utils/request'


const api_name = "/admin/system/sysUser";

// 保存用户分配角色
export const DoAssignRoleToUser = (data) => {
  return request({
    url: `/admin/system/sysRoleUser/doAssign`,
    method: 'post',
    data
  })
}





// 获取用户分页列表
export const GetSysUserListByPage = (pageNum, pageSize, queryDto) => {
  return request({
    url: `${api_name}/findByPage/${pageNum}/${pageSize}`,
    method: 'get',
    params: queryDto
  })
}


//保存用户
export const SaveSysUser = (data) => {

  return request({
    url: `${api_name}/saveSysUser`,
    method: 'post',
    data


  })
}


//修改用户
export const UpdateSysUser = (data) => {

  return request({
    url: `${api_name}/updateSysUser`,
    method: 'put',
    data


  })


}
//删除用户
export const DeleteSysUserById = userId => {

  return request({
    url: `${api_name}/deleteById/${userId}`,
    method: 'delete',



  })


}








